package work20241122;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/22
 */
public class Demo1 {
    public static void main(String[] args) {
        //打印2~20的偶数
        int num = 2;
        while (num <= 20) {
            System.out.print(num + "\t");
            num += 2;
        }
        System.out.println("========================================================");
        int n = 1;
        while (n < 21) {
            if (n % 3 == 0 && n % 5 == 0) {
                System.out.print(n + "\t");
            }
            n++;
        }
        System.out.println("========================================================");
        // 打印1-100之间的能3整除或者能被7整除的数
        for (int i = 1; i < 101; i++) {
            if (i % 3 == 0 || i % 7 == 0) {
                System.out.print(i + "\t");
            }
        }
        System.out.println();
        // 打印1-100之间的偶数
        for (int i = 2; i < 101; i += 2) {
            System.out.print(i + "\t");
        }



    }
}
